home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AEMail 2.40
/
AEMail v2.40.iso
/
arexx
/
html.aem
< prev
next >
Wrap
Text File
|
1999-03-29
|
2KB
|
90 lines
/* AEMail HTML display */
PARSE ARG file a
OPTIONS RESULTS
IF ~ SHOW('L', "rexxsupport.library") THEN DO
IF ~ ADDLIB('rexxsupport.library', 0, -30, 0) THEN
DO
ADDRESS AEMAIL1 okay1 "ARexx support library not available, exiting"
EXIT
END
END
IF (file = "") THEN DO
ADDRESS AEMAIL1 GETVAR
file = result
IF (SUBSTR(file, 1, 5) ~= 'http:') THEN DO
ADDRESS AEMAIL1 okay1 "Variable not web address"'0A'X"Found :" file
EXIT
END
END
wwwprog = ""
wwwport = ""
IF SHOWLIST('A', "IBROWSE") THEN
DO
wwwdir = "IBROWSE:"
wwwprog = "IBROWSE:Ibrowse"
wwwport = "IBROWSE"
END
ELSE IF (SHOWLIST('A', 'AWEB3')) THEN
DO
wwwdir = "AWEB3:"
wwwprog = "AWeb3:Aweb-II"
wwwport = "AWEB."
END
ELSE IF SHOWLIST('A', "AWEB-II") THEN
DO
wwwdir = "AWEB-II:"
wwwprog = "AWEB-II:AWEB-II"
wwwport = "AWEB."
END
IF (wwwport = "AWEB.") THEN
DO
ports = SHOW('P')
PARSE VAR ports dummy "AWEB." portnr .
IF (portnr = "") THEN portnr = "1"
wwwport = wwwport || portnr
END
IF ~ SHOW('P', wwwport) THEN
DO
ADDRESS COMMAND "Run >NIL: "||wwwprog
ADDRESS COMMAND "WaitForPort "||wwwport
IF ~ SHOW("P", wwwport) THEN
DO
ADDRESS COMMAND "Run >NIL: sys:utilities/multiview" file
EXIT
END
END
olddir = PRAGMA('D', wwwdir)
newdir = PRAGMA('D',"")
file2 = STRIP(file,'B','"')
IF (file2 == 'T:AMtemp') THEN DO
ADDRESS COMMAND "DELETE >NIL: t:amtemp.html"
ADDRESS COMMAND "RENAME >NIL: T:Amtemp t:amtemp.html"
file = "file://localhost/t:amtemp.html"
END
ADDRESS VALUE wwwport
IF (wwwport = "IBROWSE") THEN DO
"INFO SCREEN"
ADDRESS AEMAIL1 SCREENTOFRONT result
"GOTOURL" file
END
ELSE DO
"SCREENTOFRONT"
"OPEN" file
END
if (RC ~= 0) then ADDRESS AEMAIL1 okay1 "Your browser returned RC "RC